function Computed(vm,exp,cb){
    this.vm = vm;
    this.exp = exp;
    this.cb = cb;
    this.value = this.get();
}

Computed.prototype = {
    update:function(){
        this.run();
    },
    run:function(){
        const compuedtFun = this.vm.computed[this.exp].bind(this.vm);
        const newValue = compuedtFun();        
        const oldValue = this.value;
        if(newValue !== oldValue){
            this.value = newValue;
            this.cb.call(this.vm,newValue,oldValue);
        }
    },
    get:function(){
        Dep.target = this;
        const computedFun = this.vm.computed[this.exp].bind(this.vm);
        const value =  computedFun();
        Dep.target = null;
        return value;
    }
}